Srcs := $(wildcard *.c)
Objs := $(patsubst %.c, %.o, $(Srcs))
Out  := server

CC := gcc
CFLAGS := -Wall -g -DDEBUG -pthread -lssl -lcrypto -lcrypt -lmysqlclient

$(Out): $(Objs)
	$(CC) $^ -o $@ $(CFLAGS)
%.o: %.c algs.h
	$(CC) -c $< $(CFLAGS)

.PHONY: clean rebuild print
clean: 
	$(RM) $(Objs)
rebuild: clean $(Out)

